package cn.micro.eye.service;

import cn.micro.eye.commons.mybatis.extension.IMicroService;
import cn.micro.eye.entity.Member;
import cn.micro.eye.model.add.MemberAdd;
import cn.micro.eye.model.dto.MemberCategoryCount;
import cn.micro.eye.model.edit.MemberEdit;
import cn.micro.eye.model.query.MemberPageQuery;
import cn.micro.eye.model.vo.MemberInfoVO;
import cn.micro.eye.model.vo.MemberPageVO;
import cn.micro.eye.model.vo.MemberSearchVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * <p>
 * 用户基础信息 服务类
 * </p>
 *
 * @author lry
 * @since 2018-09-11
 */
public interface IMemberService extends IMicroService<Member> {

    MemberInfoVO info();

    Long memberCount();

    List<MemberCategoryCount> categoryCount();

    Page<MemberPageVO> searchPage(MemberPageQuery query);

    MemberPageVO get(Long id);

    Boolean delete(List<Long> ids);

    Boolean edit(MemberEdit edit);

    Boolean add(MemberAdd memberAdd) throws Exception;

    /**
     * 根据手机号码、身份证号码、邮箱地址搜索用户ID和姓名
     *
     * @param openId 手机号码、身份证号码、邮箱地址
     * @return {@link MemberSearchVO}
     */
    List<MemberSearchVO> search(String openId);

    /**
     * 获取一个随机头像
     *
     * @return Head Img Url
     */
    String randomHeadImgUrl();

}
